home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / libc / MemData.c < prev    next >
C/C++ Source or Header  |  1989-03-22  |  2KB  |  57 lines

  1. /* 
  2.  * MemData.c --
  3.  *
  4.  *    Contains variables that are shared among the various memory
  5.  *    allocation procedures.  They need to be in a separate file
  6.  *    in order to avoid unpleasant interactions with some old-
  7.  *    fashioned UNIX programs that define some or all of the malloc-
  8.  *    related stuff for themselves.  If the variables are tied to
  9.  *    a particular procedure, then the procedure will get linked in
  10.  *    whenever the variables are needed, even in the program has
  11.  *    defined its own version of that procedure.
  12.  *
  13.  * Copyright 1985, 1988 Regents of the University of California
  14.  * Permission to use, copy, modify, and distribute this
  15.  * software and its documentation for any purpose and without
  16.  * fee is hereby granted, provided that the above copyright
  17.  * notice appear in all copies.  The University of California
  18.  * makes no representations about the suitability of this
  19.  * software for any purpose.  It is provided "as is" without
  20.  * express or implied warranty.
  21.  */
  22.  
  23. #ifndef lint
  24. static char rcsid[] = "$Header: /sprite/src/lib/c/stdlib/RCS/MemData.c,v 1.1 88/08/20 21:03:49 ouster Exp $ SPRITE (Berkeley)";
  25. #endif not lint
  26.  
  27. #include "memInt.h"
  28.  
  29. /*
  30.  * Info for binned allocation.  See memInt.h for details.
  31.  */
  32.  
  33. Address        memFreeLists[BIN_BUCKETS];
  34. int        mem_NumBlocks[BIN_BUCKETS];
  35. #ifdef MEM_TRACE
  36. int        mem_NumBinnedAllocs[BIN_BUCKETS];
  37. #endif
  38.  
  39. /*
  40.  * Info for large-block allocator.  See memInt.h for details.
  41.  */
  42.  
  43. Address        memFirst, memLast;
  44. Address        memCurrentPtr;
  45. int        memLargestFree = 0;
  46. int        memBytesFreed = 0;
  47. int        mem_NumLargeBytes = 0;
  48. int        mem_NumLargeAllocs = 0;
  49. int        mem_NumLargeLoops = 0;
  50.  
  51. int        mem_NumAllocs = 0;
  52. int        mem_NumFrees = 0;
  53.  
  54. int        memInitialized = 0;
  55.  
  56. Sync_Lock    memMonitorLock;
  57.